-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed unsupported variant type: 1024 (QJSValue) #140
base: v1
Are you sure you want to change the base?
Conversation
Added proper casting from QMetaType::User (1024) with userType 1034 (i.e., QJSValue) to QVariant so it can be handled properly by the packDataValue method.
I tried this with limetext/qml .. however for me the userType is 1051 ... will try a way to not hardcode this |
Here is what i ended up with, which seems to work: diff --git a/cpp/capi.cpp b/cpp/capi.cpp
index 55ac585..c2255aa 100644
--- a/cpp/capi.cpp
+++ b/cpp/capi.cpp
@@ -745,7 +745,8 @@ void packDataValue(QVariant_ *var, DataValue *value)
break;
case QMetaType::User:
{
- if (qvar->userType() == 1034) {
+ static const int qjstype = QVariant::fromValue(QJSValue()).userType();
+ if (qvar->userType() == qjstype) {
auto var = qvar->value<QJSValue>().toVariant();
packDataValue(&var, value);
} |
Confirmed. @pjoe change works. Updated PR. |
Program called "Moom" (http://manytricks.com/moom/) which uses OS X's accesibility API could cause a crash with calling the log handler with a null file in context.
We need a test case exercising the issue to make sure we understand the problem and it doesn't not regress. Also, can you please sign the agreement so we can get the change in: |
@Niemyer, please can you merge this in. It's really useful. |
using github.com/limetext/qml-go instead of gopkg.in/qml.v1 which it seems its not under development anymore. also applyed go-qml/qml#140 closes #4
Added proper casting from QMetaType::User (1024) with userType 1034 (i.e.,
QJSValue) to QVariant so it can be handled properly by the packDataValue
method.